package com.example.demo4.service.impl;

import com.example.demo4.dao.StudentDao;
import com.example.demo4.dao.impl.StudentDaolmpl;
import com.example.demo4.entity.Student;
import com.example.demo4.service.StudentService;

import java.util.List;

public class StudentServicelmpl implements StudentService {

    StudentDao studentDao = new StudentDaolmpl() ;


    @Override
    public boolean addStudent(Student student) throws Exception {
        return studentDao.addStudent(student);
    }

    @Override
    public Student getStudentById(Integer id) throws Exception {
        return studentDao.getStudentById(id);
    }

    @Override
    public List<Student> getStudentList() throws Exception {
        return studentDao.getAllStudent();
    }

}
